home *** CD-ROM | disk | FTP | other *** search
- <!--//--><script language="javascript">
- /*
- This file is the script wrapper for the pluginchecker.dll and the pluginchecker2.dll
-
- File Dependencies:
- objTI.js The TKM Installer (ti)
-
- Required Initialization Method:
- PC_Init Required to create the control based on the installation status
- */
-
- function PLUGINCHECKER()
- {
- this.PopWOTKInstallerToForeground = PC_PopWOTKInstallerToForeground
- this.IsWOTKInstallerRunning = PC_IsWOTKInstallerRunning;
- this.GetPluginUpdateInfo = PC_GetPluginUpdateInfo;
- this.SetSelectedPlugins = PC_SetSelectedPlugins;
- this.NumberOfPlugins = PC_NumberOfPlugins;
- this.PluginsToCheck = PC_PluginsToCheck;
- this.InstallPlugins = PC_InstallPlugins;
- this.GetVersion = PC_GetVersion;
- this.Init = PC_Init;
-
- this.clsid = '8965146F-DAE3-11D2-8EA1-009027232FFE';
- this.ready = false;
- }
-
- function PC_PopWOTKInstallerToForeground()
- {
- if (document.layers) bRetVal = document.tkmpc.callMethod('PopWOTKInstallerToForeground');
- else if (document.all) bRetVal = document.tkmpc.PopWOTKInstallerToForeground();
- }
-
- function PC_IsWOTKInstallerRunning()
- {
- var sRetVal = '';
-
- if (document.layers) sRetVal = document.tkmpc.callMethod('IsWOTKInstallerRunning') + '';
- else if (document.all) sRetVal = document.tkmpc.IsWOTKInstallerRunning();
-
- if (sRetVal == '0') return false;
- else return true;
- }
-
- function PC_GetPluginUpdateInfo(index, type)
- {
- var str = '';
- var delimiter = '';
- var obj;
-
- if (PC_GetPluginUpdateInfo.arguments.length < 2)
- {
- if (document.layers) str = new String(document.tkmpc.callMethod1('GetPluginUpdateInfo', index));
- else if (document.all) str = document.tkmpc.GetPluginUpdateInfo(index);
- }
- else
- {
- if (document.layers) str = new String(document.tkmpc.callMethod2('GetPluginUpdateInfoEx', type, index));
- else if (document.all) str = document.tkmpc.GetPluginUpdateInfoEx(type, index);
- }
-
- delimiter = str.charAt(0); //use the first character as the string delimeter
- str = str.substring(1, str.length); //concat the first character off of the string
-
- obj = str.split(delimiter);
- if (obj[5]) obj[5] = parseInt(obj[5]);
- else obj[5] = 0;
- if (obj[6]) obj[6] = parseInt(obj[6]);
- else obj[6] = 0;
- if (obj[7]) obj[7] = parseInt(obj[7]);
- else obj[7] = 0;
-
- return obj;
- }
-
- function PC_SetSelectedPlugins(list, reqflag)
- {
- var nRetVal = 0;
-
- if (document.layers) nRetVal = new String(document.tkmpc.callMethod2('SetSelectedPlugins', list, reqflag));
- else if (document.all) nRetVal = document.tkmpc.SetSelectedPlugins(list, reqflag);
-
- nRetVal = parseInt(nRetVal);
- return nRetVal;
- }
-
- function PC_NumberOfPlugins(type)
- {
- var num = 0;
-
- if (PC_NumberOfPlugins.arguments.length == 0)
- {
- if (document.layers) num = new String(document.tkmpc.callMethod('NumberOfPlugins'));
- else if (document.all) num = document.tkmpc.NumberOfPlugins();
- }
- else
- {
- if (document.layers) num = new String(document.tkmpc.callMethod1('NumberOfPluginsEx', type));
- else if (document.all) num = document.tkmpc.NumberOfPluginsEx(type);
- }
-
- num = parseInt(num);
- return num;
- }
-
- function PC_PluginsToCheck(list)
- {
- if (document.layers) document.tkmpc.callMethod1('PluginsToCheck', list);
- else if (document.all) document.tkmpc.PluginsToCheck(list);
- }
-
- function PC_InstallPlugins(scenario, list)
- {
- if (document.layers) document.tkmpc.callMethod2('InstallPluginsEx', scenario, list);
- else if (document.all) document.tkmpc.InstallPluginsEx(scenario, list);
- }
-
-
- function PC_GetVersion(component)
- {
- var nRetVal = 0;
-
- if (document.layers) nRetVal = new String(document.tkmpc.callMethod1('GetVersion', component));
- else if (document.all) nRetVal = document.tkmpc.GetVersion(component);
-
- if ('FILE NOT FOUND' == (nRetVal + '')) return null;
- else return nRetVal;
- }
-
- function PC_Init()
- {
- /* If the client is installed in any fashion we will create it even if there is an update available */
- //if ((ti.status != ti.NOT_INSTALLED) && !ti.install_inprocess)
- {
- if (document.layers) document.write('<embed type="application/x-weboutfitter-container" name="tkmpc" width="" height="" clsid="{' + this.clsid + '}">');
- else if (document.all) document.write('<object id="tkmpc" name="tkmpc" classid="clsid:' + this.clsid + '" height=0 width=0></object>');
- this.ready = true;
- }
- }
-
- var pc = new PLUGINCHECKER();
- //--></script>